{include file="public/head"}

    <body>
    <div class="x-body">
      <div  class="lotus-nav" >
            <button class="layui-btn  layui-btn-sm"
            onclick="x_admin_show('添加项目','addWork.html',500,410)">
               <i class="layui-icon layui-icon-add-circle"></i>创建项目
            </button>

          <div class="layui-input-inline">
              <input value="{php}echo isset($_GET['username'])?$_GET['username']:'';{/php}"  name="username"   class="layui-input lotus-input"  placeholder="请输入项目名搜索">
          </div>

            <button class="layui-btn layui-btn-sm search-query"><i class="layui-icon layui-icon-search"></i></button>
            
            <span class="x-right">共有数据:<i class="i_count" style="color: red;font-size: 22px">{}</i>条 <button onclick="javascript:location.reload()" class="layui-btn layui-btn-xs"><i class="icon iconfont ">&#xe6aa;</i></button></span>

       </div>

       <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <legend>项目总览</legend>
</fieldset>   
 
<div style="padding: 20px; background-color: #F2F2F2;">
  <div class="layui-row layui-col-space15">
    <a type="button" href="index.html">
        <div class="layui-col-md4">
      <div class="layui-card" style="height: 200px">
        <div class="layui-card-header"><h2 style="text-align: center"><bold>项目一</bold></h2></div>
        <div class="layui-card-body">
          <img class="layadmin-homepage-pad-img" src="__images__/hospital.jpg" width="96" height="96" style="box-shadow: 0 0 0 4px rgba(0,0,0,.1);
    border-radius: 50%; margin-top:25px; margin-right:10px;float: left">
          <div class="layui-card-body">
            <span><i class="layui-icon">&#xe612;</i>&nbsp;{某人}创建项目于： <br>
              <i class="layui-icon">&#xe667;</i>&nbsp;{2019年xx月xx日}
            </span>
            
            <span style="position: absolute;
            bottom: -35px; right:200px">进度：</span>
            <div class="layui-progress layui-progress-big" lay-showpercent="true" style="position: absolute;
            bottom: -35px;
            right: 0px;
            z-index: 101;
            width: 200px">
              <div class="layui-progress-bar" lay-percent="70%"></div>
            </div> 
          </div>
          
          <div class="layui-card-footer" style="
            position: absolute;
            bottom: -60px;
            right: -70px;
            width: 310px;
            z-index: 101">
          <button class="layui-btn layui-btn-warm layui-btn-sm">分为<big>{6}</big>个阶段</button>
          <button class="layui-btn layui-btn-sm"><i class="layui-icon"></i></button>
          <button class="layui-btn layui-btn-normal layui-btn-sm"><i class="layui-icon"></i></button>
          <button class="layui-btn layui-btn-danger layui-btn-sm"><i class="layui-icon"></i></button>
          </div>
        </div>

      </div>
    </div>                   
    </a>
    
    <!-- <div class="layui-col-md4">
      <div class="layui-card" style="height: 230px">
        <div class="layui-card-header">项目一</div>
        <div class="layui-card-body">
          卡片式面板面板通常用于非白色背景色的主体内<br>
          从而映衬出边框投影
        </div>
      </div>
    </div>
    <div class="layui-col-md4">
      <div class="layui-card" style="height: 230px">
        <div class="layui-card-header">项目一</div>
        <div class="layui-card-body">
          结合 layui 的栅格系统<br>
          轻松实现响应式布局
        </div>
      </div>
    </div>
    <div class="layui-col-md4">
      <div class="layui-card" style="height: 230px">
        <div class="layui-card-header">项目一</div>
        <div class="layui-card-body">
          卡片式面板面板通常用于非白色背景色的主体内<br>
          从而映衬出边框投影
        </div>
      </div>
    </div>
    <div class="layui-col-md4">
      <div class="layui-card" style="height: 230px">
        <div class="layui-card-header">项目一</div>
        <div class="layui-card-body">
          卡片式面板面板通常用于非白色背景色的主体内<br>
          从而映衬出边框投影
        </div>
      </div>
    </div>
    <div class="layui-col-md4">
      <div class="layui-card" style="height: 230px">
        <div class="layui-card-header">项目一</div>
        <div class="layui-card-body">
          结合 layui 的栅格系统<br>
          轻松实现响应式布局
        </div>
      </div>
    </div> -->
  </div>
</div> 
 

    
    </div>
</body>
{include file="public/foot"}
    <script>
        var layer = layui.layer
            ,form = layui.form;


        $(".search-query").click(function () {
            var username = $("input[name=username]").val();
            window.location.href = 'userlist.html?username='+username;
        });

       
      function delWork(obj,id){
        var count = $(".i_count")[0].innerText;
        layer.confirm('确认要删除吗？',function(index){
            //捉到所有被选中的，发异步进行删除
            $.post("{:url('admin/user/deleteWork')}", {id: id}, function(data, textStatus, xhr) {
          /*optional stuff to do after success */
              console.log(data);
              if(data.code==1){
                  layer.msg(data.msg,{icon:1,time:1000},function(){
                    $(obj).parents('tr').remove();
                    $(".i_count").html(count-1);
                  });
              }else{
                  layer.msg(data.msg,{icon:2,time:1000});
              }
            
            });
        });
      }
    </script>
